-module('ex_7.4_double_quoted_implicit_keys').

-include_lib("eunit/include/eunit.hrl").

-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").

single_test_() ->
    ?_assertMatch(
      {yamerl_parser,
        {file,?FILENAME},
        [],
        <<>>,
        59,
        true,
        [],
        0,
        60,
        4,
        1,
        false,
        3,
        3,
        utf8,
        false,
        undefined,
        _,
        _,
        [],
        {bcoll,root,0,-1,1,1,-1,1,1},
        false,
        false,
        false,
        [{impl_key,false,false,undefined,undefined,1,1}],
        false,
        false,
        _,
        [],
        0,
        19,
        18,
        undefined,
        undefined,
        _,
        false,
        [],
        [
          {yamerl_stream_end,3,3},
          {yamerl_doc_end,3,3},
          {yamerl_collection_end,3,3,block,mapping},
          {yamerl_collection_end,3,2,flow,sequence},
          {yamerl_collection_end,2,30,flow,mapping},
          {yamerl_scalar,2,25,
            {yamerl_tag,2,25,{non_specific,"?"}},
            flow,plain,"value"},
          {yamerl_mapping_value,2,23},
          {yamerl_scalar,2,3,
            {yamerl_tag,2,3,{non_specific,"!"}},
            flow,double_quoted,"implicit flow key"},
          {yamerl_mapping_key,2,3},
          {yamerl_collection_start,2,3,
            {yamerl_tag,2,3,{non_specific,"?"}},
            flow,mapping},
          {yamerl_sequence_entry,2,3},
          {yamerl_collection_start,1,24,
            {yamerl_tag,1,24,{non_specific,"?"}},
            flow,sequence},
          {yamerl_mapping_value,1,22},
          {yamerl_scalar,1,1,
            {yamerl_tag,1,1,{non_specific,"!"}},
            flow,double_quoted,"implicit block key"},
          {yamerl_mapping_key,1,1},
          {yamerl_collection_start,1,1,
            {yamerl_tag,1,1,{non_specific,"?"}},
            block,mapping},
          {yamerl_doc_start,1,1,{1,2},_},
          {yamerl_stream_start,1,1,utf8}
        ]
      },
      yamerl_parser:file(?FILENAME)
    ).
